package com.kxq.zhuoyue.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kxq.zhuoyue.pageUtilEntity.EmpDept;
import com.kxq.zhuoyue.po.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {

    @Select("select emp_name from emp")
    List<Emp> findEmpName();


    @Select("SELECT emp.*,dept.dept_name FROM dept,emp WHERE emp.dept_id = dept.dept_id and emp_id = #{empId}")
    EmpDept getEmpById(String empId);
}
